fix: re-apply Cloudflare Pages Function proxy for iOS/Android cookie support#28
Merged
pkmaster21 merged 5 commits intomainfrom Apr 16, 2026
Merged
fix: re-apply Cloudflare Pages Function proxy for iOS/Android cookie support#28pkmaster21 merged 5 commits intomainfrom
pkmaster21 merged 5 commits intomainfrom
Conversation
…est sessions iOS Safari's ITP blocks Set-Cookie headers from cross-origin fetch() requests, even with SameSite=None; Secure, causing guest session tokens to never be stored. Adds a catch-all Pages Function that proxies /api/* to the backend API_URL so all requests are same-origin and cookies are treated as first-party.
…sions
SameSite=None was causing iOS WebKit (used by all browsers on iPhone,
including Chrome) to drop session cookies due to ITP restrictions, even
for first-party cookies set via fetch() responses. Since all API calls
now go through the same-origin Cloudflare Pages Function proxy, there
is no need for SameSite=None — SameSite=Lax works correctly for
same-site requests and is fully trusted by iOS WebKit.
Also fixes the Pages Function proxy to use getAll('set-cookie') instead
of forEach() when forwarding Set-Cookie headers, preventing the
Cloudflare Workers runtime from collapsing multiple cookies into a
single comma-joined string.
The env: key in the wrangler-action step only sets shell environment variables for the wrangler process — it does not configure Cloudflare Pages Function runtime environment variables. Added an explicit PATCH call to the Cloudflare Pages API to set API_URL before deploying, so the proxy function correctly resolves the upstream API Gateway URL.
Deploying tabby with
|
| Latest commit: |
d9068a3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91ce4228.tabby.pages.dev |
| Branch Preview URL: | https://fix-re-apply-proxy.tabby.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-applies the proxy approach that was reverted in PR #26. The Cloudflare API token was the blocker — it has now been rolled and the GitHub secret updated.
This fixes guest session cookies on iOS (WebKit ITP) and Android Chrome incognito by routing all
/api/*requests through a same-origin Cloudflare Pages Function instead of directly to the API Gateway cross-origin.Re-applies: c3ae915, 27e87b8, 644c697, c166847, 3a2f26b